package com.example.controller;

import com.example.entity.Swiper;
import com.example.service.SwiperService;
import com.example.vo.Result;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController()
public class SwiperController {
    @Resource
    private SwiperService swiperService;

    @Operation(summary = "获取首页轮播图列表")
    @GetMapping("/buyer/common/getSwiperList")
    public Result<List<Swiper>> getSwiperList(){
        List<Swiper> swiperList = swiperService.getIndexSwiperList();
        return Result.ok(swiperList);
    }
}